api-query: Continue device initialization when a backend fails#1032
api-query: Continue device initialization when a backend fails#1032
Conversation
f4cbd80 to
de099b0
Compare
de099b0 to
d9b6e6a
Compare
|
LGTM |
d9b6e6a to
0fe8047
Compare
|
A few things:
|
Device::initialize() returns early when any backend fails to initialize, preventing subsequent backends from being discovered. For example, a Vulkan initialization failure (e.g. VK_ERROR_INCOMPATIBLE_DRIVER when MoltenVK is not installed) blocks Metal device discovery on macOS. Collect backend initialization errors with joinErrors() and return them together instead. Also make lit.cfg.py resilient to an empty device list from api-query. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
0fe8047 to
1d5330c
Compare
@bogner just to make sure we're talking about the same commit message:
This explains why something is wrong together with an example case of when that has an effect (Vulkan init on MacOS), followed by how it was fixed (using Is that still too much? |
Device::initialize()returns early when any backend fails to initialize, preventing subsequent backends from being discovered. For example, a Vulkan initialization failure (e.g.VK_ERROR_INCOMPATIBLE_DRIVERwhen MoltenVK is not installed) blocks Metal device discovery on macOS.Collect backend initialization errors with
joinErrors()and return them together instead. Also makelit.cfg.pyresilient to an empty device list from api-query.Test plan
api-queryoutputs Metal device when Vulkan init fails (no MoltenVK)check-hlslruns Metal tests successfully with this change🤖 Generated with Claude Code